<template>
  <div>
    <el-upload
      class="upload-demo"
      ref="upload"
      action="/api/cmscloud.market/material/import"
      :file-list="fileList"
      :auto-upload="false"
    >
      <el-button slot="trigger" size="small" type="primary">选取附件</el-button>
    </el-upload>
    <div style="text-align:center">
      <span slot="footer" class="dialog-footer">
        <el-button size="small" type="success" @click="submitUpload">导 入</el-button>
        <el-button type="primary">关 闭</el-button>
      </span>
    </div>
  </div>
</template>

<script>
export default {
  name: '',
  props: {
    vin: {
      type: String,
      required: true
    }
  },
  data() {
    return {
      fileList: []
    };
  },
  methods: {
    //导入
    submitUpload() {
      this.$refs.upload.submit();
    }
  }
};
</script>

<style lang="less" scoped>
</style>


